/*
 *@Author: 张楚
 *@Date: 2021-08-16 19:59:23
 *@Description: 用到的小组件
*/
import 'package:flutter/material.dart';

class OfficialUntils {
  //圆角常规搜索框
  static Widget seachBar({String title, Function function}) {
    return GestureDetector(
      behavior: HitTestBehavior.translucent,
      onTap: function,
      child: Container(
        // width: 200,
        height: 36,
        // margin: EdgeInsets.only(top: 10, right: 15, left: 15),
        decoration: BoxDecoration(
            color: Color(0xffF6F6FA), borderRadius: BorderRadius.circular(18)),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Padding(
              padding: const EdgeInsets.only(left: 14),
              child: Text(
                title,
                style: TextStyle(fontSize: 14, color: Color(0xffCECECE)),
              ),
            ),
            Padding(
              padding: const EdgeInsets.only(right: 12),
              child: Icon(
                Icons.search,
                size: 16,
              ),
            )
          ],
        ),
      ),
    );
  }
}
